//
//  LoadingFrameView.m
//  JiuHApp
//
//  Created by sheng long on 13-9-4.
//  Copyright (c) 2013年 Sheng Long. All rights reserved.
//

#import "LoadingFrameView.h"
#import "SVProgressHUD.h"

//提示框自动消失时间
#define disappearTime   2.0f

@implementation LoadingFrameView

//获取自动消失的提示框 不阻塞视图
+(void)autoDisappearTipview:(NSString*)str
{
    [SVProgressHUD showWithStatus:str andtime:disappearTime];
}

//获取自动消失的提示框 不阻塞视图
+(void)autoDisappearTipview:(NSString*)str time:(CGFloat) time
{
    [SVProgressHUD showWithStatus:str andtime:time];
}

//获取自动消失的提示框 阻塞视图
+(void)autoDisappearBlockingview:(NSString*)str
{
    [SVProgressHUD showWithStatus:str andtime:1.5 maskType:SVProgressHUDMaskTypeClear];
}

//带文字的加载框 不阻塞视图
+(void)showNoBlockingLoadingview:(NSString*)str
{
    //SVProgressHUDMaskTypeClear设置背景透明，不可点击
    [SVProgressHUD showWithStatus:str maskType:SVProgressHUDMaskTypeNone];
}

//带文字的加载框 阻塞整个window
+(void)showLabelLoadingview:(NSString*)str
{
    //SVProgressHUDMaskTypeClear设置背景透明，不可点击
    [SVProgressHUD showWithStatus:str maskType:SVProgressHUDMaskTypeClear];
}

//不带文字的加载框  阻塞整个window
+(void)showLoadingview
{
    //SVProgressHUDMaskTypeClear设置背景透明，不可点击
    [SVProgressHUD showWithMaskType:SVProgressHUDMaskTypeClear ];
}

//直接消失
+(void)directlyDisappear
{
    [SVProgressHUD dismiss];
}

//显示加载成功消失
+(void)showSuccessThenDisappea:(NSString*)str
{
    [SVProgressHUD dismissWithSuccess:str];
}

//显示加载失败消失
+(void)showFailThenDisappea:(NSString*)str
{
    [SVProgressHUD dismissWithError:str];
}

@end
